<?php
/**
 * 表单模型
 */
class stu_models extends CI_Model{
	public function_construct()
	{
		if($this->db->table_exists('taskinfo')!=true)
		{
			//如果没有表就创建一个表！
			/
			
		}
	}
	/**
	 * 创建学生信息表
	 */
	public function creatTaskinfoTable()
	{
		$this->load->dbforge();
		//创建字段
	$fields = array(
    'info_id' => array(
        'type' => 'INT',
        'constraint' => 5,
        'unsigned' => TRUE,
        'auto_increment' => TRUE
    ),
    'stuname' => array(
        'type' => 'VARCHAR',
        'constraint' => '10',
  		'unique' => TRUE,
    ),
     'stunnmber' => array(
        'type' => 'VARCHAR',
        'constraint' => '20',

    ),
    'stuclass ' => array(
        'type' =>'INT',
        'constraint' => '1',
       
    'stuurl' => array(
        'type' => 'VARCHAR ',
        'constraint' => '100',
    ),
    'uptime' => array(
        'type' => 'TIMESTAMP',
        'constraint' => '100',
        'unique' => TRUE,
    ),
);
	}
}
?>